package cn.codeartist.springboot.component;

import cn.codeartist.springboot.component.aop.RequestLogAspect;
import cn.codeartist.springboot.component.context.Environments;
import cn.codeartist.springboot.component.context.GlobalController;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 组件自动注入
 *
 * @author 艾江南
 * @date 2019/4/19
 */
@Configuration
public class CommonAutoConfiguration {

    @Bean
    public Environments environments() {
        return new Environments();
    }

    @Bean
    public RequestLogAspect requestLogAspect() {
        return new RequestLogAspect();
    }

    @Bean
    public GlobalController globalController() {
        return new GlobalController();
    }
}
